package com.ming.sportdemo.service.serviceImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ming.sportdemo.bean.Util;
import com.ming.sportdemo.dao.UtilDao;
import com.ming.sportdemo.service.UtilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UtilServiceImpl extends ServiceImpl<UtilDao, Util> implements UtilService {

    @Autowired
    UtilDao utilDao;

    @Override
    public Util getUtilByMessage(String utilName,String utilPrice) {
        return utilDao.getUtilByMessage(utilName,utilPrice);
    }

    @Override
    public List<Util> getAllUtil(String utilName, String utilType, int pageStart, int pageSize) {
        return utilDao.getAllUtil(utilName,utilType,pageStart,pageSize);
    }


    @Override
    public int getUtilCounts(String utilName) {
        return utilDao.getUtilCounts(utilName);
    }


    @Override
    public int addUtil(Util util) {
        return utilDao.addUtil(util);
    }

    @Override
    public int deleteUtil(int id) {
        return utilDao.deleteUtil(id);
    }

    @Override
    public int updateUtil(Util util) {
        return utilDao.updateUtil(util);
    }

    @Override
    public Util getByName(String utilName) {
        return utilDao.getByName(utilName);
    }

    @Override
    public int sub(int utilId) {
        return utilDao.sub(utilId);
    }
}
